//
// Created by Administrator on 2022/1/29.
//

#ifndef RAPIDSVN_WIN_ADDDIRECTORYDIALOG_H
#define RAPIDSVN_WIN_ADDDIRECTORYDIALOG_H
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#include <wx/dialog.h>
#include <wx/sizer.h>
#include <wx/button.h>
#include <wx/statline.h>
#include <wx/stattext.h>
#include <wx/listbox.h>
#include <wx/filepicker.h>
#include "base.h"

/*
 * FILE_NOTIFY_CHANGE_LAST_WRITE
        | FILE_NOTIFY_CHANGE_CREATION
        | FILE_NOTIFY_CHANGE_FILE_NAME
        | FILE_NOTIFY_CHANGE_DIR_NAME;
 */
enum {
    ID_LAST_WRITE,
    ID_CHANGE_CREATION,
    ID_CHANGE_FILE_NAME,
    ID_CHANGE_DIR_NAME,

    ID_OK,
    ID_CANCEL
};

class AddDirectoryDialog: public wxDialog {
public:
    explicit AddDirectoryDialog( wxWindow *parent, wxString path );
    ~AddDirectoryDialog() override;
    //wxString getMonitorPath();
    bool ok;

    MonitorDIR getMonitorDir();

private:
    //void OnAddDirectory( wxCommandEvent &event );

    bool getSubTree();
    DWORD getNotificationFlags();
    wxString path;
private:
    wxBoxSizer *dialogRootBoxSizer;
    wxPanel *m_panel;
    wxTextCtrl* m_logBox;
    wxButton *button;
    wxFilePickerCtrl* m_filePicker1;
    //wxCheckBox* cb_isDelete;
    DWORD dwNotificationFlags;
    bool subTree;

    //
    wxCheckBox* cb_last_write;
    wxCheckBox* cb_create;
    wxCheckBox* cb_file_name;
    wxCheckBox* cb_dir_name;
    wxCheckBox* cb_subtree;
    wxButton *bt_ok;
    wxButton *bt_cancel;
    void OnCancel(wxCommandEvent &event );
    void OnOk( wxCommandEvent &event );
        DECLARE_EVENT_TABLE()
};


#endif //RAPIDSVN_WIN_ADDDIRECTORYDIALOG_H
